package net.wanho.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author：汤小洋
 * Date：2024-09-11 10:28
 * Description：<描述>
 */
@RestController
@RefreshScope // 刷新配置
public class ConfigController {

    @Value("${spring.datasource.url}")
    private String url;

    @Value("${shop.share.name}")
    private String name;

    @GetMapping("/config")
    public String config(){
        return url + "--------------" + name;
    }

}
